#include <stdio.h>
#include <math.h>

int main(){
    int N;
    double i;
    double sum = 0;
    double n;
    scanf("%d",&N);
    for(i=1;i<=3*N-2;i=i+3){
        n = 1 / i * pow(-1,i+1);
        sum = sum + n;
    }
    printf("sum = %.3f\n",sum);

    return 0;
}